package cn.com.ai.ollama;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class OllamaController {

    @Autowired(required = true)
    OllamaDelegete ollamaDelegete;

    @GetMapping("/ai/getMsg")
    public Object getOllame(@RequestParam(value = "msg") String msg) {
        return ollamaDelegete.getOllame(msg);
    }

    @GetMapping("/ai/stream/getMsg")
    public Object getOllameByStream(@RequestParam(value = "msg") String msg) {
        return ollamaDelegete.getOllameByStream(msg);
    }
}

